﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<fmt:setBundle basename="ApplicationMessage" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <jsp:include page="/WEB-INF/include/submenu-session.jsp">
    <jsp:param name="currentUrl" value="${ctx.host}/sessions/${session.id}" />
  </jsp:include>

  <div class="container-fluid ihg-container has-ihg-sidemenu">

    <div class="ihg-breadcrumb">
      <ol class="breadcrumb border-breadcrumb no-bottom-border">
        <li class="active">组内校准 – 能力项评价</li>
      </ol>
      <div class="pull-right">
        <c:set var="urlParam" value="subgroup=${subgroup}"/>
        <a href="${ctx.host}/sessions/${session.id}/peer-calibrations?${not empty subgroup ? urlParam : ''}" style="color: #155CB2; font-size: 16px;"><<&nbsp;<fmt:message key="assessor.376" /></a>
      </div>
    </div>

    <div class="ihg-content-layout" style="margin-top: 0px;">
    
      <p>
        <a class="btn btn-success" href="${ctx.host}/sessions/${session.id}/peer-calibrations/delegate-virtual-hotel?delegateId=${delegate.id}" target="_blank">前期酒店分析</a>
        <a class="btn btn-success" href="${ctx.host}/sessions/${sessionId}/peer-calibrations/view-ced-tool?delegateId=${delegate.id}" data-toggle="modal" data-target="#ced-tool">CED投资分析</a>
        <a class="btn btn-success" href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/delegate-ib-assessment?delegate=${delegate.id}" target="_blank">收件箱练习</a>
        <a class="btn btn-success" href="${not empty sessionReport ? sessionReport.ppt : 'javascript:void(0);'}" download="高管汇报PPT材料.pptx">高管汇报材料</a>
      </p>

      <ul class="list-unstyled instruction-list">
        <li><fmt:message key="assessor.387" /></li>
      </ul>     
      <div class="col-xs-12">
        <div class="evaluate-tap-layout peer-calibration">
          <ul class="nav nav-tabs submit-tab">
            <li role="presentation"><a href="javascript:void(0);" data-href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/lead-and-develop"><fmt:message key="competency.name.5" /></a></li>
            <li role="presentation"><a href="javascript:void(0);" data-href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/drive-result"><fmt:message key="competency.name.1" /></a></li>
            <li role="presentation"><a href="javascript:void(0);" data-href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/work-collaboratively"><fmt:message key="competency.name.2" /></a></li>
            <li role="presentation" class="active"><a href="javascript:void(0);" data-href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/champion-change"><fmt:message key="competency.name.4" /></a></li>
            <li role="presentation"><a href="javascript:void(0);" data-href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/owner-relations">业主关系</a></li>
            <li role="presentation"><a href="javascript:void(0);" data-href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/operations-management">运营管理</a></li>
            <li role="presentation"><a href="javascript:void(0);" data-href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/revenue-maximisation">收益最大化</a></li>
            <li role="presentation"><a href="javascript:void(0);" data-href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/financial-management"><fmt:message key="competency.name.6" /></a></li>
          </ul>
                      
          <div class="tab-content">
            <form class="form-horizontal"  action="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/competency-submit" method="POST" data-validate="true">
              <input type="hidden" name="_method" value="PATCH"/>
              <input type="hidden" name="competencyId" value="${sessionCalibrationCompetency.id}"/>
              <input type="hidden" name="taskName" value="Peer Calibration Champion Change"/>
              <input type="hidden" name="nextCompetency" value="owner-relations" />
              <div class="clearfix" style="margin-top: 10px;">
                      
                <!-- 新版评分界面 begin -->
                <div class="col-xs-12" style="background: #fff; padding: 5px 0 0;">
                  <div class="col-xs-9">
                    <div class="row" style="margin-top:5px;">
                      <div class="col-xs-8">
                        <div style="position: relative;">
                          <div class="notes-list-block-title">
                            <h4><span style="margin: 0; color: #d96932; font-weight: bold;">步骤一：</span><span style="font-size:15px;">查阅各项练习的打分结果及行为记录</span></h4>
                          </div>
                          <!-- <div class="notes-list-block-title">练习打分结果（点击可查看详细评价）</div> -->
                          <table class="table ihg-table">
                            <thead>
                              <tr>
                                <th>高管汇报</th>
                              </tr>
                            </thead>
                            <tbody>
                              <tr>
                                <td><a href="javascript:void(0);" class="olt-meeting">${oltMeetingScore}</a></td>
                              </tr>
                            </tbody>
                          </table>
                          
                          <div class="notes-list-box">
                            <div class="notes-list">
                              <div class="table-row">
                                <div class="item">
                                  <p class="title">有效的行为:</p>
                                  <p>${meetingScores['OLT Meeting'][0].sessionCompetencyScore.effective}</p>
                                </div>
                              </div>
                              <div class="table-row">
                                <div class="item">
                                  <p class="title">不够有效的行为:</p>
                                  <p>${meetingScores['OLT Meeting'][0].sessionCompetencyScore.inEffective}</p>
                                </div>
                              </div>
                          </div>
                        </div>

                        </div>
                      </div>
                      <div class="col-xs-4">
                        <div class="notes-list-block-title">
                          <h4><span style="margin: 0; color: #d96932; font-weight: bold;">步骤三：</span><span style="font-size:15px;">基于学员各项练习及各能力指标的评估结果，对该能力进行整体判断</span></h4>
                        </div>
                        <div class="row">
                          <div style="float:left;margin-left:15px;">
                            <span style="text-align: left; font-size: 15px; font-weight: bold; color: #c00000;">
                              <fmt:message key="assessor.395" />
                            </span>
                          </div>
                          <div style="margin-top:-5px;float: right;min-width: 50%;margin-right: 15px;">
                            <select name="score" class="select2 form-control competency-item" data-validate="required" ${justView ? 'disabled' : ''}>
                              <option value=""></option>
                              <option value="S" ${sessionCalibrationCompetency.score.s ? 'selected' : ''}>S</option>
                              <option value="C" ${sessionCalibrationCompetency.score.c ? 'selected' : ''}>C</option>
                              <option value="DN" ${sessionCalibrationCompetency.score.dn ? 'selected' : ''}>DN</option>
                            </select>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div>
                      <div class="col-xs-8 second">
                        <h4><span style="margin: 0; color: #d96932; font-weight: bold;">步骤二：</span><span style="font-size:15px;">基于学员在各项练习中的行为表现，针对以下各项能力指标对学员进行评价</span></h4>
                      </div>
                      <div class="col-xs-4 after-second fouth">
                        <h4><span style="margin: 0; color: #d96932; font-weight: bold;">步骤四：</span><span style="font-size:15px;">聚焦出该学员相对较强和相对较弱的能力指标（分别至少1项）</span></h4>
                      </div>
                    </div>
                    <table class="table ihg-table grade-table">
                      <thead>
                        <tr>
                          <th style="width: 6.6%;"></th>
                          <th style="width: 16.6%;">S</th>
                          <th style="width: 16.6%;">C</th>
                          <th style="width: 16.6%;">DN</th>
                          <th style="width: 10%;;">NA</th>
                          <th class="after-second strong" style="width: 16.7%;">相对较强</th>
                          <th class="after-second weak" style="width: 16.7%;">相对较弱</th>
                        </tr>
                      </thead>
                      <tbody>
                        <c:forEach var="anchorScore" items="${sessionCalibrationAnchorScores}" varStatus="status">
                          <tr>
                            <td><fmt:message key="${anchorScore.name}" />
                              <input type="hidden" name="anchorScores[${status.index}].id" value="${anchorScore.id}">
                              <input type="hidden" class="score-val" name="anchorScores[${status.index}].score" value="${anchorScore.score.alias}">
                            </td>
                            <td class="table-item ${anchorScore.score.s ? 'active' : ''}" data-option="${anchorScore.id}" data-score="S">
                              <a href="javascript:void(0);"><fmt:message key="${anchorScore.anchor.competencyName}.s" /></a>
                            </td>
                            <td class="table-item ${anchorScore.score.c ? 'active' : ''}" data-option="${anchorScore.id}" data-score="C">
                              <a href="javascript:void(0);"><fmt:message key="${anchorScore.anchor.competencyName}.c" /></a>
                            </td>
                            <td class="table-item ${anchorScore.score.dn ? 'active' : ''}" data-option="${anchorScore.id}" data-score="DN">
                              <a href="javascript:void(0);"><fmt:message key="${anchorScore.anchor.competencyName}.dn" /></a>
                            </td>
                            <td class="table-item ${anchorScore.score.na ? 'active' : ''}" data-option="${anchorScore.id}" data-score="NA">
                              <a href="javascript:void(0);">没有观察出来</a>
                            </td>
                            <td class="recommendation visibility after-second"><input class="competency-item" type="checkbox" name="strong" value="${anchorScore.id}" ${anchorScore.strong ? 'checked' : ''} ${justView ? 'disabled' : ''}></td>
                            <td class="recommendation visibility after-second"><input class="competency-item" type="checkbox" name="weak" value="${anchorScore.id}" ${anchorScore.weak ? 'checked' : ''} ${justView ? 'disabled' : ''}></td>
                          </tr>
                        </c:forEach>
                      </tbody>
                    </table>
                  </div>
                
                  <div class="col-xs-3 grade-notes-layout after-second">
                    
                    <div class="row clearfix">
                      <h4 style="margin: 20px 15px 0 15px"><span style="margin: 0; margin-top: 20px; color: #d96932; font-weight: bold;">步骤五：</span><span style="font-size:15px;">请对这项能力记录下该学员相对突出和需要提升的要点（这将作为能力项反馈的重要内容）</span></h4>
                      <div class="col-xs-12">
                        <div class="text-center" style="margin-bottom: 5px;font-size: 15px; font-weight: bold; margin-top: 30px;">相对突出的要点</div>
                        <textarea name="effective" data-validate="required" placeholder="" class="scorllbar-textarea competency-item" ${justView ? 'disabled' : ''}>${sessionCalibrationCompetency.effective}</textarea>
                      </div>
                      <div class="col-xs-12">
                        <div class="text-center" style="margin-bottom: 5px;font-size: 15px; font-weight: bold;">需要提升的要点</div>
                        <textarea name="inEffective" data-validate="required" placeholder="" class="scorllbar-textarea competency-item" ${justView ? 'disabled' : ''}>${sessionCalibrationCompetency.inEffective}</textarea>
                      </div>
                    </div>
                  </div>
                      
                  <c:if test="${!justView}">
                    <div class="text-right">
                      <button type="submit" class="btn btn-success" style="position: absolute; bottom: 10px; right: 8%;"><fmt:message key="assessor.406" /></button>
                    </div>
                  </c:if>
                  
                </div>
          
              </div>
            </form>
          </div>
        </div>
      </div>
      
      
      <!-- 最终评分弹框 -->
      <div class="scoring-wrap olt-meeting-modal">
        <div class="scoring-details" data-details="${index}" style="padding-top: 25px;">
          <a href="javascript:void(0);" class="btn btn-danger close-details pull-right">x</a>
          <br>
          <c:forEach var="meetingScore" items="${meetingScores['OLT Meeting']}">
            <div class="details-item">
              <span class="label strength-label">${meetingScore.score.alias}</span>
              <p class="description">
                <c:if test="${not empty meetingScore.score}">
                  <c:choose>
                    <c:when test="${meetingScore.score.dn_C}">
                      DN:<fmt:message key="${meetingScore.sessionAnchor.dn}" /><br>
                      C:<fmt:message key="${meetingScore.sessionAnchor.c}" />
                    </c:when>
                    <c:when test="${meetingScore.score.c_S}">
                      C:<fmt:message key="${meetingScore.sessionAnchor.c}" /><br>
                      S:<fmt:message key="${meetingScore.sessionAnchor.s}" />
                    </c:when>
                    <c:otherwise>
                      <c:set var="anchorName" value="${fn:split(meetingScore.sessionAnchor.c, '.')}" />
                      <fmt:message key="${anchorName[0]}.${anchorName[1]}.${meetingScore.score.name}" />
                    </c:otherwise>
                  </c:choose>
                </c:if>
              </p>
            </div>
          </c:forEach>
        </div>
      </div>
      
    </div>
  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/session/during/peer-calibration/assessor/report-finalizing-view.js" />
  <script type="text/javascript">
    require( [ 'page/session/during/peer-calibration/assessor/report-finalizing-view' ], function ( page ) {
      page.init({
    	  "justView": "${justView}"
      });
    })
  </script>
  
</body>
</html>
                      
                     
                    